projects
/
utf8proc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d4d7a9
)
Silence warning with -Wextra
author
Federico G. Schwindt
<fgsch@lodoss.net>
Tue, 24 Nov 2015 20:09:10 +0000
(20:09 +0000)
committer
Federico G. Schwindt
<fgsch@lodoss.net>
Tue, 24 Nov 2015 20:09:10 +0000
(20:09 +0000)
Fixes #60.
utf8proc.c
patch
|
blob
|
history
diff --git
a/utf8proc.c
b/utf8proc.c
index b685e13aac378798263a7b4558f80c2acca37b41..1f1773019c29ec2ce0885d03f8503ac44c18b253 100644
(file)
--- a/
utf8proc.c
+++ b/
utf8proc.c
@@
-436,7
+436,8
@@
UTF8PROC_DLLEXPORT utf8proc_ssize_t utf8proc_decompose(
if (decomp_result < 0) return decomp_result;
wpos += decomp_result;
/* prohibiting integer overflows due to too long strings: */
- if (wpos < 0 || wpos > SSIZE_MAX/sizeof(utf8proc_int32_t)/2)
+ if (wpos < 0 ||
+ wpos > (utf8proc_ssize_t)(SSIZE_MAX/sizeof(utf8proc_int32_t)/2))
return UTF8PROC_ERROR_OVERFLOW;
}
}